package com.wang.learn.cloudredis.controller;

import com.wang.learn.cloudredis.entity.Student;
import com.wang.learn.cloudredis.service.impl.StudentServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName MongoController
 *
 * @author wang
 * Date 2022/4/13 15:18
 */
@RestController
@RequestMapping("/mongo")
@RequiredArgsConstructor
public class MongoController {

    final StudentServiceImpl studentService;

    @PostMapping("/insert")
    public Object insert(@RequestBody Student student){
        return studentService.insertStudent(student);
    }

}
